import request from '../utils/request'

export default {
  // 获取专业列表
  getProfessionNameList() {
    return request({
      url: 'profession/getProfessionNameList',
      method: 'get'
    })
  },
  // 根据id删除专业
  removeProfession(id) {
    return request({
      url: `profession/removeProfession/${id}`,
      method: 'delete'
    })
  },
  // 根据id获取专业信息
  getProfessionInfo(id) {
    return request({
      url: `profession/getProfessionInfo/${id}`,
      method: 'get'
    })
  },
  // 新增专业
  addProfession(profession) {
    return request({
      url: 'profession/addProfession',
      method: 'post',
      data: profession
    })
  },
  // 修改专业信息
  updateProfession(profession) {
    return request({
      url: 'profession/updateProfession',
      method: 'post',
      data: profession
    })
  }
}
